#ifndef TETRIMINO_H
#define TETRIMINO_H

#include "Common.h"
#include "DxManager.h"

enum { O_BLOCK = 60, Z_BLOCK, S_BLOCK, T_BLOCK, L_BLOCK, J_BLOCK, I_BLOCK };



#define P_NUM 4

class Tetrimino
{
private:
	COORD Points[P_NUM];
	char type;
	int color;


	void setO();
	void setZ();
	void setS();
	void setT();
	void setL();
	void setJ();
	void setI();
public:
	Tetrimino();
	Tetrimino(int);
	bool Init(int);
	void RotateL();
	void RotateR();
	void Draw(DxManager*,int,int);
	COORD GetPoint(int i) { return Points[i]; }
	int getColor() { return color; }
	char getType() {return type; }
	bool isNull();
	Tetrimino operator+(Tetrimino*);
};

#endif